<template>
  <div class="register">
    <el-menu theme="light" :class="el-menu-demo" mode="horizontal">
      <img width="147px" height="35px" src="../../assets/img/logo.png">
      <el-menu-item>注册账号</el-menu-item>
      <el-button type="primary" v-bind:class="backToIndexClass" @click="backToIndex">返回登录页</el-button>
    </el-menu>
    <registerform></registerform>
  </div>
</template>

<script>
  import registerform from './RegisterForm'

  export default {
    name: 'register',
    data () {
      return {
        backToIndexClass: 'backToIndex'
      }
    },
    methods: {
      backToIndex () {
        this.$router.push({path: '/'})
      }
    },
    components: {
      registerform
    }
  }
</script>

<style scoped>
  img {
    float: left;
    margin-left: 1%;
    margin-top: 12px;
  }

  el-button {
    float: right;
  }

  .backToIndex {
    margin-top: 12px;
    margin-right: 10px;
    float: right;
  }
</style>
